package model;

import java.util.ArrayList;

import model.Batch.BatchType;

/**
 * A Lesson represents a logical Unit of Batches. A Lesson consists of many
 * Batches.
 */
public class Lesson {

	public enum RepeatMode {
		REMEMBER, TYPE
	};

	private String lessonName;
	private Batch notLearnedBatch = new Batch(BatchType.NOT_LEARNED);
	private Batch ultraShortTimeBatch = new Batch(
			BatchType.ULTRA_SHORT_TIME_MEMORY);
	private Batch shortTimeBatch = new Batch(BatchType.SHORT_TIME_MEMORY);
	private ArrayList<Batch> longTermBatches = new ArrayList<Batch>();
	private RepeatMode repeatMode;
	private boolean onlyVocabulary;
	private String description;

	public Lesson(RepeatMode repeatMode, boolean onlyVocabulary,
			String description) {
		this.repeatMode = repeatMode;
		this.onlyVocabulary = onlyVocabulary;
		this.description = description;
		initDefaultBatches();
	}

	private void initDefaultBatches() {
	}

	public String getName() {
		return lessonName;
	}

	public void setName(String name) {
		lessonName = name;
	}

	public ArrayList<Batch> gbatchesetLongTermBatches() {
		return longTermBatches;
	}

	public Batch getLongTermBatch(int index) {
		return longTermBatches.get(index);
	}

	public String getLessonName() {
		return lessonName;
	}

	public void setLessonName(String lessonName) {
		this.lessonName = lessonName;
	}

	public RepeatMode getRepeatMode() {
		return repeatMode;
	}

	public void setRepeatMode(RepeatMode repeatMode) {
		this.repeatMode = repeatMode;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean isOnlyVocabulary() {
		return onlyVocabulary;
	}

	public void addLongTermBatch(Batch tempBatch) {
		longTermBatches.add(tempBatch);
	}

	public Batch getNotLearnedBatch() {
		return notLearnedBatch;
	}

	public void setNotLearnedBatch(Batch notLearnedBatch) {
		this.notLearnedBatch = notLearnedBatch;
	}

	public Batch getUltraShortTimeBatch() {
		return ultraShortTimeBatch;
	}

	public void setUltraShortTimeBatch(Batch ultraShortTimeBatch) {
		this.ultraShortTimeBatch = ultraShortTimeBatch;
	}

	public Batch getShortTimeBatch() {
		return shortTimeBatch;
	}

	public void setShortTimeBatch(Batch shortTimeBatch) {
		this.shortTimeBatch = shortTimeBatch;
	}

	public ArrayList<Batch> getAllLongTermBatches()
	{
		return longTermBatches;
	}
}